-
Notifications
You must be signed in to change notification settings - Fork 326
fix(mobula-state): gracefully handle unresolvable symbols #4345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Change getAssetId and getQuoteId to return undefined instead of throwing errors for unresolvable symbols - Update subscribeMessage builder to skip subscriptions that can't be resolved, logging a warning instead - Fix mock server in tests to handle undefined messages (when subscribeMessage returns undefined) - This prevents the EA from crashing when background cache warming encounters symbols not in includes.json - Other valid subscriptions will continue to work even if some symbols can't be resolved
🦋 Changeset detectedLatest commit: f319ee0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
mxiao-cll
reviewed
Nov 28, 2025
mxiao-cll
reviewed
Nov 28, 2025
mxiao-cll
reviewed
Nov 28, 2025
Contributor
mxiao-cll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some tests
…equests - Return undefined instead of throwing in getAssetId/getQuoteId for unresolvable symbols - Skip subscriptions gracefully when symbols cannot be resolved - Add requestTransforms to uppercase base/quote and resolve via includes.json - Prevents background handler failures from breaking WebSocket connection - Enables lowercase requests (btc/usd) to work seamlessly This fixes the staging issue where external processes sending malformed/mixed-case symbols (e.g. USDtb) caused the background subscription handler to throw errors, preventing the WebSocket connection from being established and causing all subsequent requests to fail with 504 timeouts.
Remove manual includes.json parsing in requestTransforms since the framework already handles this automatically. Just uppercase the parameters and let the framework apply includes.json transformations. This removes 31 lines of redundant code.
- Use context.logger.warn instead of console.warn - Simplify undefined check in fixtures.ts (!message vs !message || message === 'undefined')
6831d2b to
2eb6146
Compare
- BTC is not in includes.json as a base asset - Changed lowercase test to use 'ezeth' which is in includes.json - Changed recovery test to use 'RSETH' which is in includes.json - Added RSETH mock data to fixtures
06bb044 to
52bbd09
Compare
c65de55 to
30349c0
Compare
…id cache collision
mxiao-cll
reviewed
Dec 2, 2025
mxiao-cll
approved these changes
Dec 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #ISSUE_NUMBER_GOES_HERE
Description
fix for pre release mobula-state v2 EA
Changes
Steps to Test
Quality Assurance
infra-k8sconfiguration file.adapter-secretsconfiguration file.test-payload.jsonfile with relevant requests.feature/x,chore/x,release/x,hotfix/x,fix/x) or is created from Jira.